/**********************************************************************
 Copyright (C) 2010 Teppo Eeva

 This file is part of Arithmetic Game.
 For more information, see <http://code.google.com/p/arithmetic-game/>

 Arithmetic Game is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 Arithmetic Game is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with Arithmetic Game.  If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/

#include <QtTest/QtTest>
#include <QDebug>

#include "aboutdialog.h"


class TestAboutDialog : public QObject
{
    Q_OBJECT

private slots:
    // Setup test case
    void initTestCase();

    // Actual test cases
    void doTest1();

    // Cleanup test case
    void cleanupTestCase();

private:

};


void TestAboutDialog::initTestCase()
{
    qDebug() << "-- START -- TestAboutDialog";
}

void TestAboutDialog::cleanupTestCase()
{
    qDebug() << "-- END -- TestAboutDialog";
}

void TestAboutDialog::doTest1()
{
    AboutDialog* dialog = new AboutDialog();
    QSignalSpy acceptedSpy( dialog, SIGNAL(accepted()) );

    // Shouldn't already have any signals
    QCOMPARE( acceptedSpy.count(), 0 );
    dialog->accept();

    // So the count of objects should increase.
    QCOMPARE( acceptedSpy.count(), 1 );

//    delete dialog;
}

QTEST_MAIN(TestAboutDialog)
#include "testaboutdialog.moc"
